PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Menu Manager >

Mac OS 8.5 Menu Manager Reference


SetMenuItemProperty

Associates data with a menu item.

pascal OSStatus SetMenuItemProperty (
                     MenuHandle menu,
                     UInt16 item,
                     OSType propertyCreator,
                     OSType propertyTag,
                     UInt32 propertySize,
                     void *propertyData);
menu
A value of type MenuHandle . Pass a handle to the menu containing the item with which you wish to associate data.
item
An unsigned 16-bit integer. Pass a value specifying the item number of the menu item or 0 if the data is to be associated with the menu as a whole.
propertyCreator
A four-character code. Pass your program's signature, as registered through Apple Developer Technical Support. If your program is of a type that would not normally have a signature (for example, a plug-in), you should still register and use a signature in this case, even though your program's file may not have the same creator code as the signature that you register. The 'macs' property signature is reserved for the system and should not be used.
propertyTag
A four-character code. Pass a value identifying the data. You define the tag your application uses to identify the data; this code is not to be confused with the file type for the data, but may coincide if you wish.
propertySize
An unsigned 32-bit integer. Pass a value specifying the size of the data.
propertyData
Pass a pointer to the data.
function result
A result code. See Result Codes for the Mac OS 8.5 Menu Manager .

DISCUSSION

You may use the SetMenuItemProperty function to associate any type of data with a menu item.


VERSION NOTES

Available with Mac OS 8.5 and later.


SEE ALSO

The GetMenuItemProperty function.

The RemoveMenuItemProperty function.


© 1999 Apple Computer, Inc. — (Last Updated 19 Jan 99)